package hsh.xun;
import java.util.Scanner;
public class revenue {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print(" 请输入税前工资：");
        int money = sc.nextInt();
        double shui  = 0;
        double js = money - (money * 0.1) - 5000;
        double js1 = js + 5000;

        if(js<0){
            System.out.print("不需要交税可获得"+js1);

        }
         else if (js > 0 && js <= 3000) {
            shui = js * 0.03;
        } else if (js > 3000 && js <= 12000) {
            shui = 3000 * 0.03 + (js - 3000) * 0.1;
        } else if (js > 12000 && js <= 25000) {
            shui = 3000 * 0.03 + 9000 * 0.1 + (js - 12000) * 0.2;
        } else if (js > 25000 && js <= 35000) {
            shui = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + (js - 25000) * 0.25;
        } else if (js > 35000 && js <= 55000) {
            shui = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + 10000 * 0.25 + (js - 35000) * 0.3;
        } else if (js > 55000 && js <= 80000) {
            shui = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + 10000 * 0.25 + 20000 * 0.3 + (js - 55000) * 0.35;
        } else {
            shui = 3000 * 0.03 + 9000 * 0.1 + 13000 * 0.2 + 10000 * 0.25 + 20000 * 0.3 + 25000 * 0.35 + (js - 8000) * 0.45;
        }
        double revenue1 = money - 0.1 * money - shui;
        System.out.println("纳税总额：" + shui);
        System.out.println("纳税之后可得：" + revenue1);
    }
}